<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var num1=50;
    var num2=20;
    var max=num1>num2?num1:num2;
    alert(max);
</script>
</body>
</html>